home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / XPK / Developer / Include / ASM / xpk / xpkLib.i < prev    next >
Encoding:
Text File  |  1997-06-08  |  2.6 KB  |  75 lines

  1.     INCLUDE    "xpk/xpkLibHeader.i"
  2.  
  3. ******************** $VER: xpkLib.i 1.6 (08.06.1997) *********************
  4.  
  5. ; Here the needed variables and strings are initialized. Do not change the
  6. ; format of the IDString. Only add some additional information after the
  7. ; second brake. An additional $VER: string is not needed!
  8.  
  9. VERSION        EQU    1        ; version of your library
  10. REVISION    EQU    0        ; revision of your library
  11.  
  12. LibName        DC.B    'xpk____.library',0
  13. IDString    DC.B    'xpk____ 1.0 (11.01.1997)',13,10,0
  14.         CNOP    0,2
  15.  
  16. **************************************************************************
  17.  
  18. ; Functions _InitCode and _ExitCode give you the ability to do things on
  19. ; opening and closing of library. These functions are called by init
  20. ; routine or by Expunge. Init is the only funtion, that is allowed to set a
  21. ; value for an global variable. The library pointer is in A5, registers
  22. ; have to be saved!!! If _InitCode returns not zero, the init function
  23. ; fails and thus the library cannot be opened!
  24.  
  25. ; The _InitCode function can for example be used for processor type checks:
  26. ; the <flag> place holder may be any of the following values:
  27. ; CPU's: AFF_68010, AFF_68020, AFF_68030, AFF_68040
  28. ; FPU's: AFF_68881, AFF_68882
  29. ; NOTE: for better processors (e.g. AFF_68030) the lower bits are set also
  30. ; (AFF_68020 and AFF_68010), so you only need to check one value!.
  31. ; The flags for CPU and FPU can be used both with (AFF_CPU | AFF_FPU).
  32. ;
  33. ;_InitCode
  34. ;    MOVE.L    4.W,A0
  35. ;    ANDI.W    #<flag>,AttnFlags(A0)
  36. ;    BEQ.B    .kill
  37. ;    MOVEQ    #0,D0            ; all ok, library can be opened
  38. ;    RTS
  39. ;.kill    MOVEQ    #1,D0            ; check failed, cannot open
  40. ;    RTS
  41.  
  42. ; Sometimes you do not need functions _XpksPackReset, _XpksPackFree or
  43. ; _XpksUnpackFree. In this case you can set these dummies here:
  44. ;
  45. ;_XpksPackFree
  46. ;_XpksPackReset
  47. ;_XpksUnpackFree
  48.  
  49. ; Dummy functions, mark out them if you want to use your own ones
  50. _InitCode
  51. _ExitCode    MOVEQ    #0,D0
  52.         RTS
  53. ; or set these two if the functions are extern
  54. ;    XREF    _InitCode
  55. ;    XREF    _ExitCode
  56.  
  57. **************************************************************************
  58.  
  59. ; ASM: in assembler language use this file as an include with directive
  60. ;    INCLUDE    xpkLib____.i
  61.  
  62. ; OTHER: In any other language compile this file with an assembler and get
  63. ; an object file (called like xpkLib____.o). Link this object file together
  64. ; with your other code. This file MUST be the first one (e.g. it is the
  65. ; startup code). Set the following external references.
  66. ;
  67. ;    XREF    _XpksPackerInfo
  68. ;    XREF    _XpksPackChunk
  69. ;    XREF    _XpksPackFree
  70. ;    XREF    _XpksPackReset
  71. ;    XREF    _XpksUnpackChunk
  72. ;    XREF    _XpksUnpackFree
  73.  
  74. **************************************************************************
  75.